﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Style x:Key="CloseTabButton" TargetType="{x:Type Button}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
        <Setter Property="Background" Value="Red"/>
        <Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="Width" Value="13"/>
        <Setter Property="Height" Value="13"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid>
                        <Ellipse x:Name="mainCircle" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
                        </Ellipse>
                        <Border Padding="{TemplateBinding Padding}" >
                            <Path x:Name="xPath" Data="M0,0 L1,1 M0,1 L1,0" Stretch="Uniform" Stroke="Gray">
                            </Path>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Value="Red" Property="Fill" TargetName="mainCircle"/>
                            <Setter Value="White" Property="Stroke" TargetName="xPath"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Value="Black" Property="Fill" TargetName="mainCircle"/>
                            <Setter Value="White" Property="Stroke" TargetName="xPath"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>